package com.sbj.dto.res;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.sbj.dto.jackson.CustomDecimalSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author summer
 * @version 1.0
 * @date 2024/9/10 09:41
 */
@Data
@SearchBean(tables = "member_car c left join goods g on c.goods_id=g.id",autoMapTo = "c")
public class CarRes implements Serializable {

    @DbField("c.id")
    private Integer carId;

    @DbField("g.name")
    private String goodsName;

    @DbField("g.image")
    private String goodsImage;

    @DbField("c.goods_id")
    private Integer goodsId;

    @JsonSerialize(using = CustomDecimalSerialize.class)
    @DbField("g.ruing_price")
    private BigDecimal goodsPrice;

    @DbField("c.member_id")
    private Integer memberId;

    @DbField("c.goods_num")
    private Integer goodsNum;

    @DbField("is_check")
    private Boolean checked;
}
